From: Alexander Larsson Date: Tue, 14 Aug 2018 08:09:32 +0000 (+0200) Subject: ostree_repo_pull_from_remotes_async: Fix leak of options X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~20^2~17 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=0a53af801e82cadddddd13ce54a304634df08e46;p=ostree.git ostree_repo_pull_from_remotes_async: Fix leak of options copy_option() unnecessarily passed ownership of the value to g_variant_dict_insert_value, but that already refs, so it was leaked. Closes: #1702 Approved by: cgwalters --- diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index 2a0f1c98..80c31ed8 100644 --- a/src/libostree/ostree-repo-pull.c +++ b/src/libostree/ostree-repo-pull.c @@ -5667,7 +5667,7 @@ copy_option (GVariantDict *master_options, { g_autoptr(GVariant) option_v = g_variant_dict_lookup_value (master_options, key, expected_type); if (option_v != NULL) - g_variant_dict_insert_value (slave_options, key, g_steal_pointer (&option_v)); + g_variant_dict_insert_value (slave_options, key, option_v); } /**